import { IsInt, Length } from "class-validator";
import BaseEntity from "./BaseEntity";
import { Type } from "class-transformer";
import { UserType } from "./constraints";
export default class UserEntity extends BaseEntity {

  // @IsNotEmpty({ message: '用户的班级不能为空' })
  public 'class_id': string

  // @IsNotEmpty({ message: '用户标识不能为空' })
  // @Length(1, 40)
  public 'id': string

  @Length(2, 10)
  public 'nickname': string

  @Length(1, 40)
  public 'account': string

  @Length(1, 40)
  public 'password': string

  // @Type(() => Number)
  public 'type': UserType
}